package ml.kupin.common.jedis;

import java.util.List;
import java.util.Map;

/**
 * JedisClient接口，方便在Redis单实例和Redis Cluster之间切换
 * Created by 小柯(Allen Kerr) on 17.4.28 10:13.
 */
public interface JedisClient {

    String set(String key, String value);

    String get(String key);

    Boolean exists(String key);

    Long expire(String key, int seconds);

    Long ttl(String key);

    Long incr(String key);

    Long hset(String key, String field, String value);

    String hget(String key, String field);

    Long hdel(String key, String... field);

    Boolean hexists(String key, String field);

    List<String> hvals(String key);

    Map<String, String> hgetAll(String key);

    Long del(String key);

}
